# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchSearchAds360Response do
  @moduledoc """
  Response message for SearchAds360Service.Search.

  ## Attributes

  *   `conversionCustomDimensionHeaders` (*type:* `list(GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_ConversionCustomDimensionHeader.t)`, *default:* `nil`) - The headers of the conversion custom dimensions in the results.
  *   `conversionCustomMetricHeaders` (*type:* `list(GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_ConversionCustomMetricHeader.t)`, *default:* `nil`) - The headers of the conversion custom metrics in the results.
  *   `customColumnHeaders` (*type:* `list(GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_CustomColumnHeader.t)`, *default:* `nil`) - The headers of the custom columns in the results.
  *   `fieldMask` (*type:* `String.t`, *default:* `nil`) - FieldMask that represents what fields were requested by the user.
  *   `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Pagination token used to retrieve the next page of results. Pass the content of this string as the `page_token` attribute of the next request. `next_page_token` is not returned for the last page.
  *   `rawEventConversionDimensionHeaders` (*type:* `list(GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_RawEventConversionDimensionHeader.t)`, *default:* `nil`) - The headers of the raw event conversion dimensions in the results.
  *   `rawEventConversionMetricHeaders` (*type:* `list(GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_RawEventConversionMetricHeader.t)`, *default:* `nil`) - The headers of the raw event conversion metrics in the results.
  *   `results` (*type:* `list(GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchAds360Row.t)`, *default:* `nil`) - The list of rows that matched the query.
  *   `summaryRow` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchAds360Row.t`, *default:* `nil`) - Summary row that contains summary of metrics in results. Summary of metrics means aggregation of metrics across all results, here aggregation could be sum, average, rate, etc.
  *   `totalResultsCount` (*type:* `String.t`, *default:* `nil`) - Total number of results that match the query ignoring the LIMIT clause.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :conversionCustomDimensionHeaders =>
            list(
              GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_ConversionCustomDimensionHeader.t()
            )
            | nil,
          :conversionCustomMetricHeaders =>
            list(
              GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_ConversionCustomMetricHeader.t()
            )
            | nil,
          :customColumnHeaders =>
            list(
              GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_CustomColumnHeader.t()
            )
            | nil,
          :fieldMask => String.t() | nil,
          :nextPageToken => String.t() | nil,
          :rawEventConversionDimensionHeaders =>
            list(
              GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_RawEventConversionDimensionHeader.t()
            )
            | nil,
          :rawEventConversionMetricHeaders =>
            list(
              GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_RawEventConversionMetricHeader.t()
            )
            | nil,
          :results =>
            list(
              GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchAds360Row.t()
            )
            | nil,
          :summaryRow =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchAds360Row.t()
            | nil,
          :totalResultsCount => String.t() | nil
        }

  field(:conversionCustomDimensionHeaders,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_ConversionCustomDimensionHeader,
    type: :list
  )

  field(:conversionCustomMetricHeaders,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_ConversionCustomMetricHeader,
    type: :list
  )

  field(:customColumnHeaders,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_CustomColumnHeader,
    type: :list
  )

  field(:fieldMask)
  field(:nextPageToken)

  field(:rawEventConversionDimensionHeaders,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_RawEventConversionDimensionHeader,
    type: :list
  )

  field(:rawEventConversionMetricHeaders,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_RawEventConversionMetricHeader,
    type: :list
  )

  field(:results,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchAds360Row,
    type: :list
  )

  field(:summaryRow,
    as: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchAds360Row
  )

  field(:totalResultsCount)
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchSearchAds360Response do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchSearchAds360Response.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Services_SearchSearchAds360Response do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
